package com.fjh.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/page")
public class PageController {
    /**
     * 跳转到main页面
     * @return
     */
    @GetMapping("/main.do")
    public String toMain(){
        // 看我们的spring-mvc.xml 里面的实体解析器的前后缀
        // /WEB-INF/view/ main .jsp
        return "main";
    }

    /**
     *跳转用户列表
     * @return
     */
    @GetMapping("/toUserList.do")
    public String toUserList(){
        return "sys/user/list";
    }

    /**
     * 跳转角色列表
     * @return
     */
    @GetMapping("/toRoleList.do")
    public String toRoleList(){
        return "sys/role/list";
    }

    /**
     * 跳转权限列表
     * @return
     */
    @GetMapping("/toPermsList.do")
    public String toPermsList(){
        return "sys/perms/list";
    }

    /**
     * 去用户新增页面
     * @return
     */
    @GetMapping("/toUserAdd.do")
    public String toUserAdd(){
        return "sys/user/add";
    }

    @GetMapping("/toCarList.do")
    public String toCarList() {
        return "bus/car/list";
    }

    @GetMapping("/toCustomList.do")
    public String toCustomList() {
        return "bus/custom/list";
    }

    @GetMapping("/toRentList.do")
    public String toRentList() {
        return "bus/rent/list";
    }

    @GetMapping("/toReturnList.do")
    public String toReturnList() {
        return "bus/return/list";
    }
}
